package com.heihei.itextdemo.controller;


import com.heihei.itextdemo.dto.CommonResponseDTO;
import com.heihei.itextdemo.entity.ClassEntity;
import com.heihei.itextdemo.service.ClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 班级 前端控制器
 * </p>
 *
 * @author duanhengfei
 * @since 2020-12-04
 */
@RestController
@RequestMapping("/class")
@Api(value = "班级", tags = "班级")
public class ClassController {
    @Resource
    private ClassService classService;

    /**
     * 添加
     */
    @PostMapping("/save")
    @ApiOperation(value = "添加", notes = "添加")
    public CommonResponseDTO<String> add(@RequestBody ClassEntity entity){
        return classService.add(entity);
    }

}
